var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0}), (o.EncryptUtil = o.EncryptType = void 0);
var n = e("SDK"),
    i = e("AdUtils"),
    a = ["lingqucom@2021@8", "lingqucom@2021@8", "lingqucom@2021@8"],
    r = "1qazQAZ2wsxWSX3edcEDC4rfvRFV5tgbTGB6yhnYHN7ujmUJM8ikIK9olOL0pP",
    s = "Lingqu@2021@8888",
    c = [10, 10, 10];
(function (e) {
    (e[(e.ED_LQ = 0)] = "ED_LQ"), (e[(e.ED_CY = 1)] = "ED_CY");
})(o.EncryptType || (o.EncryptType = {})),
    (function (e) {
        function t(e) {
            for (
                var t = a[n.default.Instance.edType],
                    o = CryptoJS.enc.Utf8.parse(t),
                    l =
                        (CryptoJS.enc.Utf8.parse(e),
                        CryptoJS.AES.encrypt(e, o, {
                            iv: CryptoJS.enc.Utf8.parse(s),
                            mode: CryptoJS.mode.CBC,
                            padding: CryptoJS.pad.Pkcs7
                        })),
                    d = "",
                    u = c[n.default.Instance.edType],
                    p = 1;
                p <= u;
                p++
            ) {
                var h = i.default.instance.getRandomInt(1, r.length);
                d += r.substring(h - 1, h);
            }
            return i.default.instance.log("encry---------------: " + d), d + l.toString();
        }
        function o(e) {
            var t = c[n.default.Instance.edType],
                o = a[n.default.Instance.edType];
            e = e.substring(t, e.length);
            var i = CryptoJS.enc.Utf8.parse(o),
                r = CryptoJS.AES.decrypt(e, i, {
                    iv: CryptoJS.enc.Utf8.parse(s),
                    mode: CryptoJS.mode.CBC,
                    padding: CryptoJS.pad.Pkcs7
                });
            return CryptoJS.enc.Utf8.stringify(r).toString();
        }
        (e.en = function (e) {
            return t(e);
        }),
            (e.de = function (e) {
                return o(e);
            }),
            (e.encryptIv = t),
            (e.decryptIv = o);
    })(o.EncryptUtil || (o.EncryptUtil = {}));
